package 大数据比赛样题_2020

import org.apache.spark.sql.SparkSession

object test04 {
  def main(args: Array[String]): Unit = {
    // 配置环境
    val spark = SparkSession.builder()
      .appName("data")
      .master("local[6]")
      .getOrCreate()
    import org.apache.spark.sql.functions._
    import spark.implicits._

    // 读取数据
    val data = spark.read
        .option("header",value = false)
      .csv("G:\\Projects\\IdeaProjects\\Spark_Competition\\dataset\\data.csv")
      .toDF("日期","省份","城市","新增确诊","新增出院","新增死亡","消息来源","来源1","来源2","来源3","")
    data.show()



  }
}
